#pragma once
#include <functional>

typedef std::function<void(void)> ONSIZE;

struct SplitterBarSetting {
	int index;
	bool enable;
	unsigned int max;
	unsigned int min;
};

class CCygSplitterWnd : public CSplitterWnd
{
public:
	CCygSplitterWnd();
	~CCygSplitterWnd();
	DECLARE_DYNCREATE(CCygSplitterWnd)


public:
	void SetVerticalSplitterBar(int nIndex, bool bEnable, int nMin, int nMax);
	void SetHorizontalSplitterBar(int nIndex, bool bEnable, int nMin, int nMax);

private:
	void OnDrawSplitter(CDC* pDC, ESplitType nType, const CRect& rect);
	void OnInvertTracker(const CRect& rect);
	DECLARE_MESSAGE_MAP()
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);

private:
	ONSIZE m_onSize;
	CMapWordToPtr m_mapSplitterBarSetting;


public:
	void SetOnSizeListener(ONSIZE listener);
};

